package com.jukte.recipe;

import android.content.Intent;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageButton;
import android.widget.TextView;
import com.ewhat.recipes.R;

public class BaseActivity extends FragmentActivity{
	
	ImageButton imb_search,imb_shoppingcart,imb_save,imb_add;
	TextView tv_title;
	
	public void init(){
		imb_search =(ImageButton)findViewById(R.id.imb_search);
		imb_shoppingcart =(ImageButton)findViewById(R.id.imb_shoppingcart);
		imb_save =(ImageButton)findViewById(R.id.imb_save);
		imb_add =(ImageButton)findViewById(R.id.imb_add);
		tv_title=(TextView)findViewById(R.id.textview_title_bar);
		tv_title.setSelected(true);
		
		imb_search.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View arg0) {
				startActivity(new Intent(BaseActivity.this,SearchActivity.class));
			}
		});
		imb_shoppingcart.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View arg0) {
				startActivity(new Intent(BaseActivity.this,CartActivity.class));
			}
		});
	}
}
